<?php
/**
 * Initialise the profiler module
 *
 * @package modules
 * @copyright (C) 2002-2007 The Digital Development Foundation
 * @license GPL {@link http://www.gnu.org/licenses/gpl.html}
 * @link http://www.xaraya.com
 *
 * @subpackage Profile System
 */
/**
 * Initialise the profile module
 *
 * @author John Cox <niceguyeddie@xaraya.com>
 * @access public
 * @param none $
 * @return true on success or void or false on failure
 * @throws 'DATABASE_ERROR'
 * @todo nothing
 */
function profiler_init()
{
    xarRegisterMask('AdminProfile','All','profiler','All','All','ACCESS_ADMIN');
    return true;
}

/**
 * Activate the profiler module
 *
 * @access public
 * @param none $
 * @return bool
 * @throws DATABASE_ERROR
 */
function profiler_activate()
{
    return true;
}

/**
 * Upgrade the profiler module from an old version
 *
 * @author John Cox <john.cox@wyome.com>
 * @access public
 * @param  $oldVersion
 * @return true on success or false on failure
 * @throws no exceptions
 * @todo create separate xar_profiler_queue someday
 * @todo allow profiler gateway functionality
 */
function profiler_upgrade($oldVersion)
{
    switch($oldVersion) {
    case '1.0.0':
        break;
    }
    return true;
}

/**
 * Delete the profiler module
 *
 * @author John Cox <john.cox@wyome.com>
 * @access public
 * @param no $ parameters
 * @return true on success or false on failure
 * @todo restore the default behaviour prior to 1.0 release
 */
function profiler_delete()
{
    // Remove Masks and Instances
    xarRemoveMasks('profiler');
    xarRemoveInstances('profiler');
    return true;
}

?>